import Vue from 'vue'
import Vuex from 'vuex'

Vue.use(Vuex) // vue的插件机制

// Vuex.Store 构造器选项
const store = new Vuex.Store({
	state: {
		pointTrend: '', //测点趋势图
		ContrastTrendChart: '', //指标对比趋势图
		waveform: '', //波形图
		time: '', //趋势图时间选择器
	},
	mutations: {
		alterpointTrend(state, pointTrend) {
			state.pointTrend = pointTrend;
		},
		alterContrastTrendChart(state, ContrastTrendChart) {
			state.ContrastTrendChart = ContrastTrendChart;
		},
		alterwaveform(state, waveform) {
			state.waveform = waveform;
		},
		altertimedata(state, time) {
			state.time = time;
		},
	}
})

export default store